/*   1:    */ package org.jetbrains.jps.model.module.impl;
/*   2:    */ 
/*   3:    */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsElementCollection;
import org.jetbrains.jps.model.ex.JpsCompositeElementBase;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.ex.JpsElementCollectionRole;
import org.jetbrains.jps.model.library.JpsLibrary;
import org.jetbrains.jps.model.library.JpsLibraryReference;
import org.jetbrains.jps.model.library.sdk.JpsSdkType;
import org.jetbrains.jps.model.module.*;

import java.util.List;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */
/*  13:    */
/*  14:    */
/*  15:    */
/*  16:    */
/*  17:    */
/*  18:    */
/*  19:    */ 
/*  20:    */ public class JpsDependenciesListImpl
/*  21:    */   extends JpsCompositeElementBase<JpsDependenciesListImpl>
/*  22:    */   implements JpsDependenciesList
/*  23:    */ {
/*  24: 33 */   public static final JpsElementCollectionRole<JpsDependencyElement> DEPENDENCY_COLLECTION_ROLE = JpsElementCollectionRole.create(JpsElementChildRoleBase.create("dependency"));
/*  25:    */   
/*  26:    */   public JpsDependenciesListImpl()
/*  27:    */   {
/*  28: 38 */     this.myContainer.setChild(DEPENDENCY_COLLECTION_ROLE);
/*  29:    */   }
/*  30:    */   
/*  31:    */   private JpsDependenciesListImpl(JpsDependenciesListImpl paramJpsDependenciesListImpl)
/*  32:    */   {
/*  33: 42 */     super(paramJpsDependenciesListImpl);
/*  34:    */   }
/*  35:    */   
/*  36:    */   @NotNull
/*  37:    */   public List<JpsDependencyElement> getDependencies()
/*  38:    */   {
/*  39: 48 */     List tmp18_13 = ((JpsElementCollection)this.myContainer.getChild(DEPENDENCY_COLLECTION_ROLE)).getElements();
/*  40: 48 */     if (tmp18_13 == null) {
/*  41: 48 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "getDependencies" }));
/*  42:    */     }
/*  43: 48 */     return tmp18_13;
/*  44:    */   }
/*  45:    */   
/*  46:    */   public void clear()
/*  47:    */   {
/*  48: 53 */     ((JpsElementCollection)this.myContainer.getChild(DEPENDENCY_COLLECTION_ROLE)).removeAllChildren();
/*  49:    */   }
/*  50:    */   
/*  51:    */   @NotNull
/*  52:    */   public JpsModuleDependency addModuleDependency(@NotNull JpsModule paramJpsModule)
/*  53:    */   {
/*  54: 59 */     if (paramJpsModule == null) {
/*  55: 59 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addModuleDependency" }));
/*  56:    */     }
/*  57: 59 */     JpsModuleDependency tmp50_47 = addModuleDependency(paramJpsModule.createReference());
/*  58: 59 */     if (tmp50_47 == null) {
/*  59: 59 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addModuleDependency" }));
/*  60:    */     }
/*  61: 59 */     return tmp50_47;
/*  62:    */   }
/*  63:    */   
/*  64:    */   @NotNull
/*  65:    */   public JpsModuleDependency addModuleDependency(@NotNull JpsModuleReference paramJpsModuleReference)
/*  66:    */   {
/*  67: 65 */     if (paramJpsModuleReference == null) {
/*  68: 65 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addModuleDependency" }));
/*  69:    */     }
/*  70: 65 */     JpsModuleDependencyImpl localJpsModuleDependencyImpl = new JpsModuleDependencyImpl(paramJpsModuleReference);
/*  71: 66 */     ((JpsElementCollection)this.myContainer.getChild(DEPENDENCY_COLLECTION_ROLE)).addChild(localJpsModuleDependencyImpl); JpsModuleDependencyImpl 
/*  72: 67 */       tmp70_69 = localJpsModuleDependencyImpl;
/*  73: 67 */     if (tmp70_69 == null) {
/*  74: 67 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addModuleDependency" }));
/*  75:    */     }
/*  76: 67 */     return tmp70_69;
/*  77:    */   }
/*  78:    */   
/*  79:    */   @NotNull
/*  80:    */   public JpsLibraryDependency addLibraryDependency(@NotNull JpsLibrary paramJpsLibrary)
/*  81:    */   {
/*  82: 73 */     if (paramJpsLibrary == null) {
/*  83: 73 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addLibraryDependency" }));
/*  84:    */     }
/*  85: 73 */     JpsLibraryDependency tmp50_47 = addLibraryDependency(paramJpsLibrary.createReference());
/*  86: 73 */     if (tmp50_47 == null) {
/*  87: 73 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addLibraryDependency" }));
/*  88:    */     }
/*  89: 73 */     return tmp50_47;
/*  90:    */   }
/*  91:    */   
/*  92:    */   @NotNull
/*  93:    */   public JpsLibraryDependency addLibraryDependency(@NotNull JpsLibraryReference paramJpsLibraryReference)
/*  94:    */   {
/*  95: 79 */     if (paramJpsLibraryReference == null) {
/*  96: 79 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addLibraryDependency" }));
/*  97:    */     }
/*  98: 79 */     JpsLibraryDependencyImpl localJpsLibraryDependencyImpl = new JpsLibraryDependencyImpl(paramJpsLibraryReference);
/*  99: 80 */     ((JpsElementCollection)this.myContainer.getChild(DEPENDENCY_COLLECTION_ROLE)).addChild(localJpsLibraryDependencyImpl); JpsLibraryDependencyImpl 
/* 100: 81 */       tmp70_69 = localJpsLibraryDependencyImpl;
/* 101: 81 */     if (tmp70_69 == null) {
/* 102: 81 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addLibraryDependency" }));
/* 103:    */     }
/* 104: 81 */     return tmp70_69;
/* 105:    */   }
/* 106:    */   
/* 107:    */   public void addModuleSourceDependency()
/* 108:    */   {
/* 109: 86 */     ((JpsElementCollection)this.myContainer.getChild(DEPENDENCY_COLLECTION_ROLE)).addChild(new JpsModuleSourceDependencyImpl());
/* 110:    */   }
/* 111:    */   
/* 112:    */   public void addSdkDependency(@NotNull JpsSdkType<?> paramJpsSdkType)
/* 113:    */   {
/* 114: 91 */     if (paramJpsSdkType == null) {
/* 115: 91 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "addSdkDependency" }));
/* 116:    */     }
/* 117: 91 */     ((JpsElementCollection)this.myContainer.getChild(DEPENDENCY_COLLECTION_ROLE)).addChild(new JpsSdkDependencyImpl(paramJpsSdkType));
/* 118:    */   }
/* 119:    */   
/* 120:    */   @NotNull
/* 121:    */   public JpsDependenciesListImpl createCopy()
/* 122:    */   {
/* 123: 97 */     void tmp8_5 = new JpsDependenciesListImpl(this);
/* 124: 97 */     if (tmp8_5 == null) {
/* 125: 97 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsDependenciesListImpl", "createCopy" }));
/* 126:    */     }
/* 127: 97 */     return tmp8_5;
/* 128:    */   }
/* 129:    */   
/* 130:    */   public JpsModuleImpl getParent()
/* 131:    */   {
/* 132:102 */     return (JpsModuleImpl)super.getParent();
/* 133:    */   }
/* 134:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.module.impl.JpsDependenciesListImpl

 * JD-Core Version:    0.7.0.1

 */